﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.AddIn.Pipeline;
using System.Windows;
using System.AddIn.Contract;

namespace Dashboard
{
    [HostAdapter]
    internal class CalculatorContractToViewHostAdapter : DashboardAddIn
    {
        private IDashboardAddInContract contract;
        private ContractHandle handle;

        public CalculatorContractToViewHostAdapter(IDashboardAddInContract contract)
        {
            this.contract = contract;
            handle = new ContractHandle(contract);
        }
        public override string AddInId()
        {
            return contract.AddInId();
        }

        public override FrameworkElement Page()
        {
            INativeHandleContract iNativeHandleContract = contract.Page();
            return FrameworkElementAdapters.ContractToViewAdapter(iNativeHandleContract);
        }

        public override System.Windows.Forms.UserControl WinFormPage()
        {
            return contract.WinFormPage();
            //throw new NotImplementedException();
        }
    }
}
